package exception;

/**
 * A runtime exception class. When a position that is not valid would be made, this Exception is thrown.
 * 
 * @author Molderez Tom, 2de bach Ingenieurswetenschappen Computerwetenschappen-Elektrotechniek and Reniers Jorn, 2de bach Ingenieurswetenschappen Werktuigkunde-Computerwetenschappen
 * @version 1.0
 *
 */
public class IllegalPositionException extends RuntimeException {

	private static final long serialVersionUID = 1L;
	
	/**
	 * Creates a new IllegalPositionException for the given position.
	 * 
	 * @param position The illegal position.
	 * @param message The error message.
	 */
	public IllegalPositionException(long x, long y, String message) {
		super(message);
		this.x=x;
		this.y=y;
		}
	
	/**
	 * Returns the message with this exception.
	 */
	public String getMessage(){
		return "Illegal Position at " + x +"-" + y + ", message: " + super.getMessage(); 
	}
	
	private final long x;
	private final long y;
}
